using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace DTO
{
    /// <summary> 
    ///Author: daiduong19051986@gmail.com 
    /// <summary>

    public class TVC_MFMOVInfo
    {
        #region Local Variable
        public class Field
        {
            public static string Code = "Code",
             PostCode = "PostCode",
             Type = "Type",
             Description = "Description",
             Period = "Period",
             TransDate = "TransDate",
             Reference = "Reference",
             ShipmentDate = "ShipmentDate",
             ShipmentBy = "ShipmentBy",
             BLAWBNo = "BLAWBNo",
             DeliveryPoint = "DeliveryPoint",
             Remark = "Remark",
             From_ = "From_",
             To_ = "To_",
             Supplier = "Supplier",
             WellCode = "WellCode",
             Department = "Department",
             PINo = "PINo",
             ItemCode = "ItemCode",
             PartNo = "PartNo",
             SerialNo = "SerialNo",
             Status = "Status",
             Location = "Location",
             Quantity = "Quantity",
             Amount = "Amount",
             POValue = "POValue",
             OtherValue1 = "OtherValue1",
             OtherValue2 = "OtherValue2",
             OtherValue3 = "OtherValue3",
             POSOContract = "POSOContract",
             Budget = "Budget",
             BudgetAccount = "BudgetAccount",
             Account = "Account",
             isLink = "isLink",
             Hold = "Hold",
             Average = "Average",
             BINNo = "BINNo",
             ANAL_M0 = "ANAL_M0",
             ANAL_M1 = "ANAL_M1",
             ANAL_M2 = "ANAL_M2",
             ANAL_M3 = "ANAL_M3",
             ANAL_M4 = "ANAL_M4",
             ANAL_M5 = "ANAL_M5",
             SUNStatus = "SUNStatus",
             Intransit = "Intransit",
             PostBy = "PostBy",
             PostDate = "PostDate",
             CreatedBy = "CreatedBy",
             ModifiedBy = "ModifiedBy",
             CreatedDate = "CreatedDate",
             ModifiedDate = "ModifiedDate",
             Verified = "Verified",
             ConfirmDate = "ConfirmDate";
        }
        private String _Code;
        private String _PostCode;
        private String _Type;
        private String _Description;
        private Int32 _Period;
        private DateTime _TransDate;
        private String _Reference;
        private DateTime _ShipmentDate;
        private String _ShipmentBy;
        private String _BLAWBNo;
        private String _DeliveryPoint;
        private String _Remark;
        private String _From_;
        private String _To_;
        private String _Supplier;
        private String _WellCode;
        private String _Department;
        private String _PINo;
        private String _ItemCode;
        private String _PartNo;
        private String _SerialNo;
        private String _Status;
        private String _Location;
        private Int32 _Quantity;
        private Double _Amount;
        private Double _POValue;
        private Double _OtherValue1;
        private Double _OtherValue2;
        private Double _OtherValue3;
        private String _POSOContract;
        string _BudgetAccount;
        string _Budget;
        private String _Account;
        private Int16 _isLink;
        private String _Hold;
        private Double _Average;
        private String _BINNo;
        private String _ANAL_M0;
        private String _ANAL_M1;
        private String _ANAL_M2;
        private String _ANAL_M3;
        private String _ANAL_M4;
        private String _ANAL_M5;
        private String _SUNStatus;
        private String _Intransit;
        private String _PostBy;
        private DateTime _PostDate;
        private String _CreatedBy;
        private String _ModifiedBy;
        private DateTime _CreatedDate;
        private DateTime _ModifiedDate;
        private String _Verified;
        private DateTime _ConfirmDate;
        //private global::Gizmox.WebGUI.Forms.ListViewItem globalGizmoxWebGUIFormsListViewItem;

        public String Code { get { return _Code; } set { _Code = value; } }
        public String PostCode { get { return _PostCode; } set { _PostCode = value; } }
        public String Type { get { return _Type; } set { _Type = value; } }
        public String Description { get { return _Description; } set { _Description = value; } }
        public Int32 Period { get { return _Period; } set { _Period = value; } }
        public DateTime TransDate { get { return _TransDate; } set { _TransDate = value; } }
        public String Reference { get { return _Reference; } set { _Reference = value; } }
        public DateTime ShipmentDate { get { return _ShipmentDate; } set { _ShipmentDate = value; } }
        public String ShipmentBy { get { return _ShipmentBy; } set { _ShipmentBy = value; } }
        public String BLAWBNo { get { return _BLAWBNo; } set { _BLAWBNo = value; } }
        public String DeliveryPoint { get { return _DeliveryPoint; } set { _DeliveryPoint = value; } }
        public String Remark { get { return _Remark; } set { _Remark = value; } }
        public String From_ { get { return _From_; } set { _From_ = value; } }
        public String To_ { get { return _To_; } set { _To_ = value; } }
        public String Supplier { get { return _Supplier; } set { _Supplier = value; } }
        public String WellCode { get { return _WellCode; } set { _WellCode = value; } }
        public String Department { get { return _Department; } set { _Department = value; } }
        public String PINo { get { return _PINo; } set { _PINo = value; } }
        public String ItemCode { get { return _ItemCode; } set { _ItemCode = value; } }
        public String PartNo { get { return _PartNo; } set { _PartNo = value; } }
        public String SerialNo { get { return _SerialNo; } set { _SerialNo = value; } }
        public String Status { get { return _Status; } set { _Status = value; } }
        public String Location { get { return _Location; } set { _Location = value; } }
        public Int32 Quantity { get { return _Quantity; } set { _Quantity = value; } }
        public Double Amount { get { return _Amount; } set { _Amount = value; } }
        public Double POValue { get { return _POValue; } set { _POValue = value; } }
        public Double OtherValue1 { get { return _OtherValue1; } set { _OtherValue1 = value; } }
        public Double OtherValue2 { get { return _OtherValue2; } set { _OtherValue2 = value; } }
        public Double OtherValue3 { get { return _OtherValue3; } set { _OtherValue3 = value; } }
        public String POSOContract { get { return _POSOContract; } set { _POSOContract = value; } }
        public string Budget { get { return _Budget; } set { _Budget = value; } }
        public string BudgetAccount { get { return _BudgetAccount; } set { _BudgetAccount = value; } }
        public String Account { get { return _Account; } set { _Account = value; } }
        public Int16 isLink { get { return _isLink; } set { _isLink = value; } }
        public String Hold { get { return _Hold; } set { _Hold = value; } }
        public Double Average { get { return _Average; } set { _Average = value; } }
        public String BINNo { get { return _BINNo; } set { _BINNo = value; } }
        public String ANAL_M0 { get { return _ANAL_M0; } set { _ANAL_M0 = value; } }
        public String ANAL_M1 { get { return _ANAL_M1; } set { _ANAL_M1 = value; } }
        public String ANAL_M2 { get { return _ANAL_M2; } set { _ANAL_M2 = value; } }
        public String ANAL_M3 { get { return _ANAL_M3; } set { _ANAL_M3 = value; } }
        public String ANAL_M4 { get { return _ANAL_M4; } set { _ANAL_M4 = value; } }
        public String ANAL_M5 { get { return _ANAL_M5; } set { _ANAL_M5 = value; } }
        public String SUNStatus { get { return _SUNStatus; } set { _SUNStatus = value; } }
        public String Intransit { get { return _Intransit; } set { _Intransit = value; } }
        public String PostBy { get { return _PostBy; } set { _PostBy = value; } }
        public DateTime PostDate { get { return _PostDate; } set { _PostDate = value; } }
        public String CreatedBy { get { return _CreatedBy; } set { _CreatedBy = value; } }
        public String ModifiedBy { get { return _ModifiedBy; } set { _ModifiedBy = value; } }
        public DateTime CreatedDate { get { return _CreatedDate; } set { _CreatedDate = value; } }
        public DateTime ModifiedDate { get { return _ModifiedDate; } set { _ModifiedDate = value; } }
        public String Verified { get { return _Verified; } set { _Verified = value; } }
        public DateTime ConfirmDate { get { return _ConfirmDate; } set { _ConfirmDate = value; } }

        #endregion LocalVariable

        #region Constructor
        public TVC_MFMOVInfo()
        {
            _Code = "";
            _PostCode = "Z";
            _Type = "";
            _Description = "";
            _Period = 0;
            _TransDate = DateTime.Now;
            _Reference = "";
            _ShipmentDate = DateTime.Now;
            _ShipmentBy = "N/A";
            _BLAWBNo = "";
            _DeliveryPoint = "";
            _Remark = "";
            _From_ = "";
            _To_ = "";
            _Supplier = "";
            _WellCode = "";
            _Department = "";
            _PINo = "N/A";
            _ItemCode = "";
            _PartNo = "";
            _SerialNo = "";
            _Status = "";
            _Location = "";
            _Quantity = 0;
            _Amount = 0;
            _POValue = 0;
            _OtherValue1 = 0;
            _OtherValue2 = 0;
            _OtherValue3 = 0;
            _POSOContract = "";
            _Budget = "";
            _BudgetAccount = "";
            _Account = "";
            _isLink = (Int16)0;
            _Hold = "Y";
            _Average = 0;
            _BINNo = "";
            _ANAL_M0 = "";
            _ANAL_M1 = "";
            _ANAL_M2 = "";
            _ANAL_M3 = "";
            _ANAL_M4 = "";
            _ANAL_M5 = "";
            _SUNStatus = "N";
            _Intransit = "";
            _PostBy = "";
            _PostDate = Convert.ToDateTime("1900/01/01");
            _CreatedBy = "";
            _ModifiedBy = "";
            _CreatedDate = DateTime.Now;
            _ModifiedDate = Convert.ToDateTime("1900/01/01");
            _Verified = "";
            _ConfirmDate = Convert.ToDateTime("1900/01/01");
        }
        public TVC_MFMOVInfo(
        String Code,
        String PostCode,
        String Type,
        String Description,
        Int32 Period,
        DateTime TransDate,
        String Reference,
        DateTime ShipmentDate,
        String ShipmentBy,
        String BLAWBNo,
        String DeliveryPoint,
        String Remark,
        String From_,
        String To_,
        String Supplier,
        String WellCode,
        String Department,
        String PINo,
        String ItemCode,
        String PartNo,
        String SerialNo,
        String Status,
        String Location,
        Int32 Quantity,
        Double Amount,
        Double POValue,
        Double OtherValue1,
            Double OtherValue2,
            Double OtherValue3,
        String POSOContract,
            string Budget,
            string BudgetAccount,
        String Account,
        Int16 isLink,
        String Hold,
        Double Average,
        String BINNo,
        String ANAL_M0,
        String ANAL_M1,
        String ANAL_M2,
        String ANAL_M3,
        String ANAL_M4,
        String ANAL_M5,
        String SUNStatus,
            String Intransit,
        String PostBy,
        DateTime PostDate,
        String CreatedBy,
        String ModifiedBy,
        DateTime CreatedDate,
        DateTime ModifiedDate,
            String Verified,
            DateTime ConfirmDate
        )
        {
            _Code = Code;
            _PostCode = PostCode;
            _Type = Type;
            _Description = Description;
            _Period = Period;
            _TransDate = TransDate;
            _Reference = Reference;
            _ShipmentDate = ShipmentDate;
            _ShipmentBy = ShipmentBy;
            _BLAWBNo = BLAWBNo;
            _DeliveryPoint = DeliveryPoint;
            _Remark = Remark;
            _From_ = From_;
            _To_ = To_;
            _Supplier = Supplier;
            _WellCode = WellCode;
            _Department = Department;
            _PINo = PINo;
            _ItemCode = ItemCode;
            _PartNo = PartNo;
            _SerialNo = SerialNo;
            _Status = Status;
            _Location = Location;
            _Quantity = Quantity;
            _Amount = Amount;
            _POValue = POValue;
            _OtherValue1 = OtherValue1;
            _OtherValue2 = OtherValue2;
            _OtherValue3 = OtherValue3;
            _POSOContract = POSOContract;
            _Budget = Budget;
            _BudgetAccount = BudgetAccount;
            _Account = Account;
            _isLink = isLink;
            _Hold = Hold;
            _Average = Average;
            _BINNo = BINNo;
            _ANAL_M0 = ANAL_M0;
            _ANAL_M1 = ANAL_M1;
            _ANAL_M2 = ANAL_M2;
            _ANAL_M3 = ANAL_M3;
            _ANAL_M4 = ANAL_M4;
            _ANAL_M5 = ANAL_M5;
            _SUNStatus = SUNStatus;
            _Intransit = Intransit;
            _PostBy = PostBy;
            _PostDate = PostDate;
            _CreatedBy = CreatedBy;
            _ModifiedBy = ModifiedBy;
            _CreatedDate = CreatedDate;
            _ModifiedDate = ModifiedDate;
            _Verified = Verified;
            _ConfirmDate = ConfirmDate;
        }
        public TVC_MFMOVInfo(DataRow dr)
        {
            if (dr != null)
            {
                _Code = dr[Field.Code.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Code.ToString()]);
                _PostCode = dr[Field.PostCode.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.PostCode.ToString()]);
                _Type = dr[Field.Type.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Type.ToString()]);
                _Description = dr[Field.Description.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Description.ToString()]);
                _Period = dr[Field.Period.ToString()] == DBNull.Value ? 0 : Convert.ToInt32(dr[Field.Period.ToString()]);
                _TransDate = dr[Field.TransDate.ToString()] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr[Field.TransDate.ToString()]);
                _Reference = dr[Field.Reference.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Reference.ToString()]);
                _ShipmentDate = dr[Field.ShipmentDate.ToString()] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr[Field.ShipmentDate.ToString()]);
                _ShipmentBy = dr[Field.ShipmentBy.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.ShipmentBy.ToString()]);
                _BLAWBNo = dr[Field.BLAWBNo.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.BLAWBNo.ToString()]);
                _DeliveryPoint = dr[Field.DeliveryPoint.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.DeliveryPoint.ToString()]);
                _Remark = dr[Field.Remark.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Remark.ToString()]);
                _From_ = dr[Field.From_.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.From_.ToString()]);
                _To_ = dr[Field.To_.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.To_.ToString()]);
                _Supplier = dr[Field.Supplier.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Supplier.ToString()]);
                _WellCode = dr[Field.WellCode.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.WellCode.ToString()]);
                _Department = dr[Field.Department.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Department.ToString()]);
                _PINo = dr[Field.PINo.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.PINo.ToString()]);
                _ItemCode = dr[Field.ItemCode.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.ItemCode.ToString()]);
                _PartNo = dr[Field.PartNo.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.PartNo.ToString()]);
                _SerialNo = dr[Field.SerialNo.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.SerialNo.ToString()]);
                _Status = dr[Field.Status.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Status.ToString()]);
                _Location = dr[Field.Location.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Location.ToString()]);
                _Quantity = dr[Field.Quantity.ToString()] == DBNull.Value ? 0 : Convert.ToInt32(dr[Field.Quantity.ToString()]);
                _Amount = dr[Field.Amount.ToString()] == DBNull.Value ? 0 : Convert.ToDouble(dr[Field.Amount.ToString()]);
                _POValue = dr[Field.POValue.ToString()] == DBNull.Value ? 0 : Convert.ToDouble(dr[Field.POValue.ToString()]);
                _OtherValue1 = dr[Field.OtherValue1.ToString()] == DBNull.Value ? 0 : Convert.ToDouble(dr[Field.OtherValue1.ToString()]);
                _OtherValue1 = dr[Field.OtherValue2.ToString()] == DBNull.Value ? 0 : Convert.ToDouble(dr[Field.OtherValue2.ToString()]);
                _OtherValue1 = dr[Field.OtherValue3.ToString()] == DBNull.Value ? 0 : Convert.ToDouble(dr[Field.OtherValue3.ToString()]);
                _POSOContract = dr[Field.POSOContract.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.POSOContract.ToString()]);
                _Budget = dr[Field.Budget.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Budget.ToString()]);
                _BudgetAccount = dr[Field.BudgetAccount.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.BudgetAccount.ToString()]);
                _Account = dr[Field.Account.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Account.ToString()]);
                _isLink = dr[Field.isLink.ToString()] == DBNull.Value ? (Int16)0 : Convert.ToInt16(dr[Field.isLink.ToString()]);
                _Hold = dr[Field.Hold.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Hold.ToString()]);
                _Average = dr[Field.Average.ToString()] == DBNull.Value ? 0 : Convert.ToDouble(dr[Field.Average.ToString()]);
                _BINNo = dr[Field.BINNo.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.BINNo.ToString()]);
                _ANAL_M0 = dr[Field.ANAL_M0.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.ANAL_M0.ToString()]);
                _ANAL_M1 = dr[Field.ANAL_M1.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.ANAL_M1.ToString()]);
                _ANAL_M2 = dr[Field.ANAL_M2.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.ANAL_M2.ToString()]);
                _ANAL_M3 = dr[Field.ANAL_M3.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.ANAL_M3.ToString()]);
                _ANAL_M4 = dr[Field.ANAL_M4.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.ANAL_M4.ToString()]);
                _ANAL_M5 = dr[Field.ANAL_M5.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.ANAL_M5.ToString()]);
                _SUNStatus = dr[Field.SUNStatus.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.SUNStatus.ToString()]);
                _Intransit = dr[Field.Intransit.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Intransit.ToString()]);
                _PostBy = dr[Field.PostBy.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.PostBy.ToString()]);
                _PostDate = dr[Field.PostDate.ToString()] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr[Field.PostDate.ToString()]);
                _CreatedBy = dr[Field.CreatedBy.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.CreatedBy.ToString()]);
                _ModifiedBy = dr[Field.ModifiedBy.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.ModifiedBy.ToString()]);
                _CreatedDate = dr[Field.CreatedDate.ToString()] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr[Field.CreatedDate.ToString()]);
                _ModifiedDate = dr[Field.ModifiedDate.ToString()] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr[Field.ModifiedDate.ToString()]);
                _Verified = dr[Field.Verified.ToString()] == DBNull.Value ? "" : Convert.ToString(dr[Field.Verified.ToString()]);
                _ConfirmDate = dr[Field.ConfirmDate.ToString()] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr[Field.ConfirmDate.ToString()]);
            }
        }
        public TVC_MFMOVInfo(DataRowView dr) : this(dr.Row) { }
        public TVC_MFMOVInfo(TVC_MFMOVInfo objEntr)
        {
            if (objEntr != null)
            {
                _Code = objEntr.Code;
                _PostCode = objEntr.PostCode;
                _Type = objEntr.Type;
                _Description = objEntr.Description;
                _Period = objEntr.Period;
                _TransDate = objEntr.TransDate;
                _Reference = objEntr.Reference;
                _ShipmentDate = objEntr.ShipmentDate;
                _ShipmentBy = objEntr.ShipmentBy;
                _BLAWBNo = objEntr.BLAWBNo;
                _DeliveryPoint = objEntr.DeliveryPoint;
                _Remark = objEntr.Remark;
                _From_ = objEntr.From_;
                _To_ = objEntr.To_;
                _Supplier = objEntr.Supplier;
                _WellCode = objEntr.WellCode;
                _Department = objEntr.Department;
                _PINo = objEntr.PINo;
                _ItemCode = objEntr.ItemCode;
                _PartNo = objEntr.PartNo;
                _SerialNo = objEntr.SerialNo;
                _Status = objEntr.Status;
                _Location = objEntr.Location;
                _Quantity = objEntr.Quantity;
                _Amount = objEntr.Amount;
                _POValue = objEntr.POValue;
                _OtherValue1 = objEntr._OtherValue1;
                _OtherValue2 = objEntr._OtherValue2;
                _OtherValue3 = objEntr._OtherValue3;
                _POSOContract = objEntr.POSOContract;
                _Budget = objEntr.Budget;
                _BudgetAccount = objEntr.BudgetAccount;
                _Account = objEntr.Account;
                _isLink = objEntr.isLink;
                _Hold = objEntr.Hold;
                _Average = objEntr.Average;
                _BINNo = objEntr.BINNo;
                _ANAL_M0 = objEntr.ANAL_M0;
                _ANAL_M1 = objEntr.ANAL_M1;
                _ANAL_M2 = objEntr.ANAL_M2;
                _ANAL_M3 = objEntr.ANAL_M3;
                _ANAL_M4 = objEntr.ANAL_M4;
                _ANAL_M5 = objEntr.ANAL_M5;
                _SUNStatus = objEntr.SUNStatus;
                _Intransit = objEntr.Intransit;
                _PostBy = objEntr.PostBy;
                _PostDate = objEntr.PostDate;
                _CreatedBy = objEntr.CreatedBy;
                _ModifiedBy = objEntr.ModifiedBy;
                _CreatedDate = objEntr.CreatedDate;
                _ModifiedDate = objEntr.ModifiedDate;
                _Verified = objEntr.Verified;
                _ConfirmDate = objEntr.ConfirmDate;
            }
        }

        //public TVC_MFMOVInfo(global::Gizmox.WebGUI.Forms.ListViewItem globalGizmoxWebGUIFormsListViewItem)
        //{
        //    // TODO: Complete member initialization
        //    this.globalGizmoxWebGUIFormsListViewItem = globalGizmoxWebGUIFormsListViewItem;
        //}

        //public TVC_MFMOVInfo(global::Gizmox.WebGUI.Forms.ListViewItem globalGizmoxWebGUIFormsListViewItem)
        //{
        //    // TODO: Complete member initialization
        //    this.globalGizmoxWebGUIFormsListViewItem = globalGizmoxWebGUIFormsListViewItem;
        //}
        #endregion Constructor

        #region InitTable
        public DataTable ToDataTable()
        {
            DataTable dt = new DataTable("TVC_MFMOVHVJ");
            dt.Columns.AddRange(new DataColumn[] { 
				new DataColumn(Field.Code.ToString(), typeof(String)),
				new DataColumn(Field.PostCode.ToString(), typeof(String)),
				new DataColumn(Field.Type.ToString(), typeof(String)),
				new DataColumn(Field.Description.ToString(), typeof(String)),
				new DataColumn(Field.Period.ToString(), typeof(Int32)),
				new DataColumn(Field.TransDate.ToString(), typeof(DateTime)),
				new DataColumn(Field.Reference.ToString(), typeof(String)),
				new DataColumn(Field.ShipmentDate.ToString(), typeof(DateTime)),
				new DataColumn(Field.ShipmentBy.ToString(), typeof(String)),
				new DataColumn(Field.BLAWBNo.ToString(), typeof(String)),
				new DataColumn(Field.DeliveryPoint.ToString(), typeof(String)),
				new DataColumn(Field.Remark.ToString(), typeof(String)),
				new DataColumn(Field.From_.ToString(), typeof(String)),
				new DataColumn(Field.To_.ToString(), typeof(String)),
				new DataColumn(Field.Supplier.ToString(), typeof(String)),
				new DataColumn(Field.WellCode.ToString(), typeof(String)),
				new DataColumn(Field.Department.ToString(), typeof(String)),
				new DataColumn(Field.PINo.ToString(), typeof(String)),
				new DataColumn(Field.ItemCode.ToString(), typeof(String)),
				new DataColumn(Field.PartNo.ToString(), typeof(String)),
				new DataColumn(Field.SerialNo.ToString(), typeof(String)),
				new DataColumn(Field.Status.ToString(), typeof(String)),
				new DataColumn(Field.Location.ToString(), typeof(String)),
				new DataColumn(Field.Quantity.ToString(), typeof(Int32)),
				new DataColumn(Field.Amount.ToString(), typeof(Double)),
                new DataColumn(Field.POValue.ToString(), typeof(Double)),
                new DataColumn(Field.OtherValue1.ToString(), typeof(Double)),
                new DataColumn(Field.OtherValue2.ToString(), typeof(Double)),
                new DataColumn(Field.OtherValue3.ToString(), typeof(Double)),
				new DataColumn(Field.POSOContract.ToString(), typeof(String)),
                new DataColumn(Field.Budget.ToString(), typeof(String)),
                new DataColumn(Field.BudgetAccount.ToString(), typeof(String)),
				new DataColumn(Field.Account.ToString(), typeof(String)),
				new DataColumn(Field.isLink.ToString(), typeof(Int16)),
				new DataColumn(Field.Hold.ToString(), typeof(String)),
				new DataColumn(Field.Average.ToString(), typeof(Double)),
				new DataColumn(Field.BINNo.ToString(), typeof(String)),
				new DataColumn(Field.ANAL_M0.ToString(), typeof(String)),
				new DataColumn(Field.ANAL_M1.ToString(), typeof(String)),
				new DataColumn(Field.ANAL_M2.ToString(), typeof(String)),
				new DataColumn(Field.ANAL_M3.ToString(), typeof(String)),
				new DataColumn(Field.ANAL_M4.ToString(), typeof(String)),
				new DataColumn(Field.ANAL_M5.ToString(), typeof(String)),
				new DataColumn(Field.SUNStatus.ToString(), typeof(String)),
                new DataColumn(Field.Intransit.ToString(),typeof(String)),
				new DataColumn(Field.PostBy.ToString(), typeof(String)),
				new DataColumn(Field.PostDate.ToString(), typeof(DateTime)),
				new DataColumn(Field.CreatedBy.ToString(), typeof(String)),
				new DataColumn(Field.ModifiedBy.ToString(), typeof(String)),
				new DataColumn(Field.CreatedDate.ToString(), typeof(DateTime)),
				new DataColumn(Field.ModifiedDate.ToString(), typeof(DateTime)),
                				new DataColumn(Field.Verified.ToString(), typeof(String)),
                new DataColumn(Field.ConfirmDate.ToString(), typeof(DateTime)),                
			});
            return dt;
        }
        public DataRow ToDataRow(DataTable dt)
        {
            DataRow row = dt.NewRow();
            row[Field.Code.ToString()] = _Code;
            row[Field.PostCode.ToString()] = _PostCode;
            row[Field.Type.ToString()] = _Type;
            row[Field.Description.ToString()] = _Description;
            row[Field.Period.ToString()] = _Period;
            row[Field.TransDate.ToString()] = _TransDate;
            row[Field.Reference.ToString()] = _Reference;
            row[Field.ShipmentDate.ToString()] = _ShipmentDate;
            row[Field.ShipmentBy.ToString()] = _ShipmentBy;
            row[Field.BLAWBNo.ToString()] = _BLAWBNo;
            row[Field.DeliveryPoint.ToString()] = _DeliveryPoint;
            row[Field.Remark.ToString()] = _Remark;
            row[Field.From_.ToString()] = _From_;
            row[Field.To_.ToString()] = _To_;
            row[Field.Supplier.ToString()] = _Supplier;
            row[Field.WellCode.ToString()] = _WellCode;
            row[Field.Department.ToString()] = _Department;
            row[Field.PINo.ToString()] = _PINo;
            row[Field.ItemCode.ToString()] = _ItemCode;
            row[Field.PartNo.ToString()] = _PartNo;
            row[Field.SerialNo.ToString()] = _SerialNo;
            row[Field.Status.ToString()] = _Status;
            row[Field.Location.ToString()] = _Location;
            row[Field.Quantity.ToString()] = _Quantity;
            row[Field.Amount.ToString()] = _Amount;
            row[Field.POValue.ToString()] = _POValue;
            row[Field.OtherValue1.ToString()] = _OtherValue1;
            row[Field.OtherValue2.ToString()] = _OtherValue2;
            row[Field.OtherValue3.ToString()] = _OtherValue3;
            row[Field.POSOContract.ToString()] = _POSOContract;
            row[Field.Budget.ToString()] = _Budget;
            row[Field.BudgetAccount.ToString()] = _BudgetAccount;
            row[Field.Account.ToString()] = _Account;
            row[Field.isLink.ToString()] = _isLink;
            row[Field.Hold.ToString()] = _Hold;
            row[Field.Average.ToString()] = _Average;
            row[Field.BINNo.ToString()] = _BINNo;
            row[Field.ANAL_M0.ToString()] = _ANAL_M0;
            row[Field.ANAL_M1.ToString()] = _ANAL_M1;
            row[Field.ANAL_M2.ToString()] = _ANAL_M2;
            row[Field.ANAL_M3.ToString()] = _ANAL_M3;
            row[Field.ANAL_M4.ToString()] = _ANAL_M4;
            row[Field.ANAL_M5.ToString()] = _ANAL_M5;
            row[Field.SUNStatus.ToString()] = _SUNStatus;
            row[Field.Intransit.ToString()] = _Intransit;
            row[Field.PostBy.ToString()] = _PostBy;
            row[Field.PostDate.ToString()] = _PostDate;
            row[Field.CreatedBy.ToString()] = _CreatedBy;
            row[Field.ModifiedBy.ToString()] = _ModifiedBy;
            row[Field.CreatedDate.ToString()] = _CreatedDate;
            row[Field.ModifiedDate.ToString()] = _ModifiedDate;
            row[Field.Verified.ToString()] = _Verified;
            row[Field.ConfirmDate.ToString()] = _ConfirmDate;
            return row;
        }
        //public DataRow ToDataRow(TVC_MFMOVInfo info)
        //{
        //    DataRow row = new DataRow();
        //    row[Field.Code.ToString()] = _Code;
        //    row[Field.PostCode.ToString()] = _PostCode;
        //    row[Field.Type.ToString()] = _Type;
        //    row[Field.Description.ToString()] = _Description;
        //    row[Field.Period.ToString()] = _Period;
        //    row[Field.TransDate.ToString()] = _TransDate;
        //    row[Field.Reference.ToString()] = _Reference;
        //    row[Field.ShipmentDate.ToString()] = _ShipmentDate;
        //    row[Field.ShipmentBy.ToString()] = _ShipmentBy;
        //    row[Field.BLAWBNo.ToString()] = _BLAWBNo;
        //    row[Field.DeliveryPoint.ToString()] = _DeliveryPoint;
        //    row[Field.Remark.ToString()] = _Remark;
        //    row[Field.From_.ToString()] = _From_;
        //    row[Field.To_.ToString()] = _To_;
        //    row[Field.Supplier.ToString()] = _Supplier;
        //    row[Field.WellCode.ToString()] = _WellCode;
        //    row[Field.Department.ToString()] = _Department;
        //    row[Field.PINo.ToString()] = _PINo;
        //    row[Field.ItemCode.ToString()] = _ItemCode;
        //    row[Field.PartNo.ToString()] = _PartNo;
        //    row[Field.SerialNo.ToString()] = _SerialNo;
        //    row[Field.Status.ToString()] = _Status;
        //    row[Field.Location.ToString()] = _Location;
        //    row[Field.Quantity.ToString()] = _Quantity;
        //    row[Field.Amount.ToString()] = _Amount;
        //    row[Field.POSOContract.ToString()] = _POSOContract;
        //    row[Field.Account.ToString()] = _Account;
        //    row[Field.isLink.ToString()] = _isLink;
        //    row[Field.Hold.ToString()] = _Hold;
        //    row[Field.Average.ToString()] = _Average;
        //    row[Field.BINNo.ToString()] = _BINNo;
        //    row[Field.ANAL_M0.ToString()] = _ANAL_M0;
        //    row[Field.ANAL_M1.ToString()] = _ANAL_M1;
        //    row[Field.ANAL_M2.ToString()] = _ANAL_M2;
        //    row[Field.ANAL_M3.ToString()] = _ANAL_M3;
        //    row[Field.ANAL_M4.ToString()] = _ANAL_M4;
        //    row[Field.ANAL_M5.ToString()] = _ANAL_M5;
        //    row[Field.SUNStatus.ToString()] = _SUNStatus;
        //    row[Field.PostBy.ToString()] = _PostBy;
        //    row[Field.PostDate.ToString()] = _PostDate;
        //    row[Field.CreatedBy.ToString()] = _CreatedBy;
        //    row[Field.ModifiedBy.ToString()] = _ModifiedBy;
        //    row[Field.CreatedDate.ToString()] = _CreatedDate;
        //    row[Field.ModifiedDate.ToString()] = _ModifiedDate;
        //    return row;
        //}
        #endregion InitTable
    }
}
